package edu.chiansoft.spring01;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component(value = "people01")
public class People {
    private int id;
    private String name;
    private Log logger= LogFactory.getLog( People.class);
    public
    People() {
    logger.info( "构造函数被调用！" );
    }

    public
    People(int id) {
        this.id = id;
    }

    public
    People(String name) {
        this.name = name;
    }

    public
    People(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public
    int getId() {
        return id;
    }
@Value( value = "2")
    public
    void setId(int id) {
        this.id = id;
    }

    public
    String getName() {
        return name;
    }
@Value( value = "htkuo02")
    public
    void setName(String name) {
        this.name = name;
    }
}
